package com.lwm.jdbc.jdbc;

import com.lwm.jdbc.dao.IAccountDAO;
import com.lwm.jdbc.pojo.AccountDO;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liweimin
 * @date 2021/6/11 15:00
 * @since
 */
public class SpringJdbcTemplateDemo {
    public static void main(String[] args) {
        ApplicationContext app = new ClassPathXmlApplicationContext("bean.xml");
        IAccountDAO accountDAO = app.getBean("accountDAO", IAccountDAO.class);
        AccountDO accountDO = accountDAO.selectAccountById(2);
        System.out.println(accountDO);


//        accountDO.setMoney(5000f);
//        accountDO.setName("lwmzz");
//
//        System.out.println(accountDAO.updateAccount(accountDO));
    }
}
